﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;

namespace ServiceFramework.Tests
{
    [TestFixture]
    public class ServiceManagerFixture
    {
        [Test]
        public void should_start_a_service_manager()
        {
            IServiceManager serviceManager = new TcpServiceManager();
            serviceManager.SetTransport(new MockTransport());
        }

        //public void should_log_an_info_message_to_listeners()
        //{
        //    IServiceManager serviceManager = new TcpServiceManager();
        //    serviceManager.Start();

        //    serviceManager.NotifyClients("Hello!");
        //}
    }

    public abstract class ServiceManagerBase : IServiceManager
    {
        public void SetTransport(IServiceTransport transport)
        {
            throw new System.NotImplementedException();
        }
    }

    public class TcpServiceManager : ServiceManagerBase
    {
        
    }

    public class MockServiceManager : IServiceManager
    {
        
        public void Start()
        {
            throw new System.NotImplementedException();
        }

        public void SetTransport(IServiceTransport transport)
        {
            throw new System.NotImplementedException();
        }
    }

    public class MockTransport : IServiceTransport
    {
        public void StartListening()
        {
            throw new System.NotImplementedException();
        }

        public void StopListening()
        {
            throw new System.NotImplementedException();
        }

        //public void Initialize(ServiceInfo info)
        //{
        //    throw new System.NotImplementedException();
        //}

        public void NotifyListeners(string messageType, object message)
        {
            throw new System.NotImplementedException();
        }
    }

    public interface IServiceManager
    {
        void SetTransport(IServiceTransport transport);
    }
}
